3.48 \(\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx\)

Optimal. Leaf size=54 \[ -\frac{d (c+d x) \cot (a+b x)}{b^2}+\frac{d^2 \log (\sin (a+b x))}{b^3}-\frac{(c+d x)^2 \csc ^2(a+b x)}{2 b} \]

[Out]

-((d*(c + d*x)*Cot[a + b*x])/b^2) - ((c + d*x)^2*Csc[a + b*x]^2)/(2*b) + (d^2*Log[Sin[a + b*x]])/b^3

________________________________________________________________________________________

Rubi [A]  time = 0.0653742, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.136, Rules used = {4410, 4184, 3475} \[ -\frac{d (c+d x) \cot (a+b x)}{b^2}+\frac{d^2 \log (\sin (a+b x))}{b^3}-\frac{(c+d x)^2 \csc ^2(a+b x)}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^2*Cot[a + b*x]*Csc[a + b*x]^2,x]

[Out]

-((d*(c + d*x)*Cot[a + b*x])/b^2) - ((c + d*x)^2*Csc[a + b*x]^2)/(2*b) + (d^2*Log[Sin[a + b*x]])/b^3

Rule 4410

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp
[((c + d*x)^m*Csc[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /; Fr
eeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx &=-\frac{(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac{d \int (c+d x) \csc ^2(a+b x) \, dx}{b}\\ &=-\frac{d (c+d x) \cot (a+b x)}{b^2}-\frac{(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac{d^2 \int \cot (a+b x) \, dx}{b^2}\\ &=-\frac{d (c+d x) \cot (a+b x)}{b^2}-\frac{(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac{d^2 \log (\sin (a+b x))}{b^3}\\ \end{align*}

Mathematica [C]  time = 0.918487, size = 94, normalized size = 1.74 \[ \frac{-b^2 (c+d x)^2 \csc ^2(a+b x)+2 b d \csc (a) \sin (b x) (c+d x) \csc (a+b x)-2 i d^2 \tan ^{-1}(\tan (a+b x))-2 b d^2 x \cot (a)+d^2 \log \left (\sin ^2(a+b x)\right )+2 i b d^2 x}{2 b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^2*Cot[a + b*x]*Csc[a + b*x]^2,x]

[Out]

((2*I)*b*d^2*x - (2*I)*d^2*ArcTan[Tan[a + b*x]] - 2*b*d^2*x*Cot[a] - b^2*(c + d*x)^2*Csc[a + b*x]^2 + d^2*Log[
Sin[a + b*x]^2] + 2*b*d*(c + d*x)*Csc[a]*Csc[a + b*x]*Sin[b*x])/(2*b^3)

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 95, normalized size = 1.8 \begin{align*} -{\frac{{d}^{2}{x}^{2}}{2\,b \left ( \sin \left ( bx+a \right ) \right ) ^{2}}}-{\frac{{d}^{2}\cot \left ( bx+a \right ) x}{{b}^{2}}}+{\frac{{d}^{2}\ln \left ( \sin \left ( bx+a \right ) \right ) }{{b}^{3}}}-{\frac{cdx}{b \left ( \sin \left ( bx+a \right ) \right ) ^{2}}}-{\frac{cd\cot \left ( bx+a \right ) }{{b}^{2}}}-{\frac{{c}^{2}}{2\,b \left ( \sin \left ( bx+a \right ) \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x)

[Out]

-1/2/b*d^2/sin(b*x+a)^2*x^2-1/b^2*d^2*cot(b*x+a)*x+d^2*ln(sin(b*x+a))/b^3-1/b*c*d/sin(b*x+a)^2*x-1/b^2*c*d*cot
(b*x+a)-1/2/b*c^2/sin(b*x+a)^2

________________________________________________________________________________________

Maxima [B]  time = 1.3463, size = 1526, normalized size = 28.26 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="maxima")

[Out]

1/2*(4*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x + a)*cos(2*b*x + 2*a) + sin(
2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*
a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*c*d/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4
*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2
 + 4*cos(2*b*x + 2*a) - 1)*b) - 4*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x +
 a)*cos(2*b*x + 2*a) + sin(2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*
b*x + 2*a) - cos(2*b*x + 2*a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*a*d^2/((2*(2*cos(2*b*x + 2*a) - 1)*cos
(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x
+ 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*b^2) + (8*(b*x + a)^2*cos(2*b*x + 2*a)^2 + 8*(b*x + a)
^2*sin(2*b*x + 2*a)^2 - 4*(b*x + a)^2*cos(2*b*x + 2*a) - 4*((b*x + a)^2*cos(2*b*x + 2*a) + (b*x + a)*sin(2*b*x
 + 2*a))*cos(4*b*x + 4*a) + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x +
2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a)
- 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a)
- cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin
(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) - 4*((b*x
+ a)^2*sin(2*b*x + 2*a) + b*x - (b*x + a)*cos(2*b*x + 2*a) + a)*sin(4*b*x + 4*a) + 4*(b*x + a)*sin(2*b*x + 2*a
))*d^2/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x +
 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*b^2) - c^2/sin(
b*x + a)^2 + 2*a*c*d/(b*sin(b*x + a)^2) - a^2*d^2/(b^2*sin(b*x + a)^2))/b

________________________________________________________________________________________

Fricas [A]  time = 0.504084, size = 231, normalized size = 4.28 \begin{align*} \frac{b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} + 2 \,{\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \,{\left (d^{2} \cos \left (b x + a\right )^{2} - d^{2}\right )} \log \left (\frac{1}{2} \, \sin \left (b x + a\right )\right )}{2 \,{\left (b^{3} \cos \left (b x + a\right )^{2} - b^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="fricas")

[Out]

1/2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 + 2*(b*d^2*x + b*c*d)*cos(b*x + a)*sin(b*x + a) + 2*(d^2*cos(b*x + a)
^2 - d^2)*log(1/2*sin(b*x + a)))/(b^3*cos(b*x + a)^2 - b^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**2*cos(b*x+a)*csc(b*x+a)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 2.5771, size = 4701, normalized size = 87.06 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="giac")

[Out]

-1/8*(b^2*d^2*x^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*c*d*x*tan(1/2*b*x)^4*tan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